package com.demo.cms.model;

import org.apache.lucene.document.Field.Index;
import org.apache.lucene.document.Field.TermVector;

import com.demo.core.model.support.SimpleBaseModel;
import com.demo.search.annotation.SearchableProperty;

/**
 * 文章内容模型
 * 将一篇文章分割为一个或多个部分，
 * 有助于展现层对一篇文章进行分页。
 * 
 * @author ryuu.kk
 *
 */
public class ArticleContent extends SimpleBaseModel implements java.io.Serializable {

	/**
	 * 版本序列化ID
	 */
	private static final long serialVersionUID = 2747114927625429605L;
	
	/**
	 * 文章外键ID
	 */
	private Long articleId;

	/**
	 * 文章内容位置
	 */
	private Integer index;
	
	/**
	 * 文章内容
	 */
	@SearchableProperty(index = Index.ANALYZED, 
			termVector = TermVector.WITH_POSITIONS_OFFSETS, 
			allowHighlighter = true)
	private String content;
	
	public Long getArticleId() {
		return articleId;
	}

	public void setArticleId(Long articleId) {
		this.articleId = articleId;
	}

	public Integer getIndex() {
		return index;
	}

	public void setIndex(Integer index) {
		this.index = index;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
}
